# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=ruby-httparty
_pkgname=httparty
pkgver=0.23.1
pkgrel=1
pkgdesc='Makes http fun! Also, makes consuming restful web services dead easy.'
arch=('any')
url='https://rubygems.org/gems/httparty'
license=('MIT')
depends=('ruby' 'ruby-json' 'ruby-multi_xml' 'ruby-mime-types')
source=("https://rubygems.org/gems/$_pkgname-$pkgver.gem")
sha512sums=('167fdf9df97af526d1e176ce9524a1996fea670f96be49ea2e7545a1518febcd06fcc877cf71ff5019a67322ab94032020678a5665c344b23693b8d724a876f9')
noextract=("$_pkgname-$pkgver.gem")

package() {
  _gemdir=$(ruby -e 'puts Gem.default_dir')

  if [[ $CARCH == arm* ]] ; then
    gem install --no-user-install --ignore-dependencies --no-rdoc --no-ri \
      -i "$pkgdir$_gemdir" "$_pkgname-$pkgver.gem"
  else
    gem install --no-user-install --ignore-dependencies -i "$pkgdir$_gemdir" \
      "$_pkgname-$pkgver.gem"
  fi
}

